{% capture meta_title %}{% if page.title %}{{ page.title | strip_html }}{% else %}{{ site.title }}{% endif %}{% endcapture %}
{% capture meta_description %}{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}{% endcapture %}
{% capture meta_keywords %}{% if page.keywords %}{{ page.keywords }}{% else %}{{ site.keywords }}{% endif %}{% endcapture %}
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    {% if page.url == "/" %}
    <title>{{ site.title }} &#8212; {{ site.description }}</title>
    {% else %}
    <title>{% if page.title %}{{ page.title | strip_html }} &#8212; {% endif %}{{ site.title }}</title>
    {% endif %}
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="{{ meta_description }}">
    <meta name="keywords" content="{{ meta_keywords }}">
    <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
    <link rel="Shortcut Icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="apple-touch-icon" href="/touch-icon-iphone.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/touch-icon-ipad.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/touch-icon-iphone-retina.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/touch-icon-ipad-retina.png">
    <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ site.baseurl }}/feed.xml" />

    <meta property="og:site_name" content="{{ site.title }}" />
    <meta property="og:title" content="{{ meta_title }}" />
    <meta property="og:url" content="{{ site.url }}{{ page.url }}" />
    <meta property="og:description" content="{{ meta_description }}" />
    <meta property="og:image" content="{{ site.url }}/logo.png"/>

    <meta name="twitter:card" content="summary" />
    <meta name="twitter:site" content="@SwiftDocOrg" />
    <meta name="twitter:creator" content="@SwiftDocOrg" />
    <meta name="twitter:title" content="{{ meta_title }}" />
    <meta name="twitter:description" content="{{ meta_description | escape }}" />
    <meta name="twitter:url" content="{{ site.url }}{{ page.url }}" />
    <meta name="twitter:image" content="{{ site.url }}/logo.png"/>

    {% asset screen.css %}
    {% asset application.js %}

    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    {% if page.root %}
    <script src="{{ page.root }}/assets/js/swift-linkdata.js"></script>
    {% endif %}
  </head>
